let timer:any = null
export function debounce  (fn:Function, wain:number){
    if (timer != null) {
            clearTimeout(timer)
     }
     timer = setTimeout(()=>{
            fn()
    },wain)
}